Red Hat 7 安装后环境配置

Red Hat 7 安装后环境配置

配置静态的ip地址

  • 查看系统的使用的网卡
    ifconfig 我本地网卡为eno16777736
  • 打开配置文件
    vi /etc/sysconfig/network-scripts/ifcfg-eno16777736
  • 静态ip设置,需要根据自己的网络参数修改配置文件
    BOOTPROTO=static 指定地址的获取方式
    IPADDR=192.168.0.225 ip地址
    NETMASK=255.255.255.0 子网掩码
    GATEWAY=192.168.0.1 网关
  • 重启服务
    systemctl restart network
  • ping测试
    ping 8.8.8.8
    PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
    64 bytes from 8.8.8.8: icmp_seq=1 ttl=45 time=241 ms
    测试如上结果,成功!

Adhere to the original technology to share, your support will encourage me to continue to create!